const getTableColumns = (tabs) => {
  const { current, nameList } = tabs;
  const notLinkedColumns = [
    {
      title: '品牌名称',
      key: 'brandName',
      width: 150
    },
    {
      title: '品牌英文名称',
      key: 'brandEnName',
      width: 150
    },
    {
      title: '品牌描述',
      key: 'note',
      width: 250
    }
  ]
  const linkedColumns = [
    {
      title: '品牌名称',
      key: 'brandName',
      width: 120
    },
    {
      title: '售价指导加价率',
      width: 160,
      key: 'guideAddRate',
      type: 'inputPrecisionMinMaxNumChange',
      max: 10,
      precision: 2
    },
    {
      title: '成交最低加价率',
      width: 160,
      key: 'limitAddRate',
      type: 'inputPrecisionMinMaxNumChange',
      max: 10,
      precision: 2
    },
    {
      title: '品牌英文名称',
      key: 'brandEnName',
      width: 120
    },
    {
      title: '品牌描述',
      key: 'note',
      width: 180
    }
  ]
  const mappingColumns = {
    [nameList[0]]: notLinkedColumns,
    [nameList[1]]: linkedColumns
  }
  return mappingColumns[current] || [];
}
export { getTableColumns }
